import request from '@/utils/requset'

// 获取图书列表
export const getBookList = (data: any): any => request({
  method: 'post',
  url: '/books/list',
  data
})

// 添加图书图书
export const addBookApi = (data: any): any => request({
  method: 'post',
  url: '/books/add',
  data
})
// 编辑图书
export const updateBookApi = (id: number | string, data: any): any => request({
  method: 'patch',
  url: '/books/update/' + id,
  data
})

// 查询图书详情图书
export const queryBookApi = (id: string | number): any => request({
  method: 'get',
  url: '/books/detail/' + id
})

// 删除图书
export const delBookApi = (id: string | number): any => request({
  method: 'delete',
  url: '/books/del/' + id
})
